<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Mime::Type</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Mime::Type</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/rails/actionpack/lib/action_controller/mime_type_rb.html">
                vendor/rails/actionpack/lib/action_controller/mime_type.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Encapsulates the notion of a mime type. Can be used at render time, for
example, with:
</p>
<pre>
  class PostsController &lt; ActionController::Base
    def show
      @post = Post.find(params[:id])

      respond_to do |format|
        format.html
        format.ics { render :text =&gt; post.to_ics, :mime_type =&gt; Mime::Type[&quot;text/calendar&quot;]  }
        format.xml { render :xml =&gt; @people.to_xml }
      end
    end
  end
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M002219">==</a>&nbsp;&nbsp;
      <a href="#M002218">===</a>&nbsp;&nbsp;
      <a href="#M002222">browser_generated?</a>&nbsp;&nbsp;
      <a href="#M002221">html?</a>&nbsp;&nbsp;
      <a href="#M002209">lookup</a>&nbsp;&nbsp;
      <a href="#M002210">lookup_by_extension</a>&nbsp;&nbsp;
      <a href="#M002214">new</a>&nbsp;&nbsp;
      <a href="#M002213">parse</a>&nbsp;&nbsp;
      <a href="#M002212">register</a>&nbsp;&nbsp;
      <a href="#M002211">register_alias</a>&nbsp;&nbsp;
      <a href="#M002215">to_s</a>&nbsp;&nbsp;
      <a href="#M002216">to_str</a>&nbsp;&nbsp;
      <a href="#M002217">to_sym</a>&nbsp;&nbsp;
      <a href="#M002208">unverifiable_types</a>&nbsp;&nbsp;
      <a href="#M002220">verify_request?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M002209" class="method-detail">
        <a name="M002209"></a>

        <div class="method-heading">
          <a href="#M002209" class="method-signature">
          <span class="method-name">lookup</span><span class="method-args">(string)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002209-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002209-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 65</span>
65:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">string</span>)
66:         <span class="ruby-constant">LOOKUP</span>[<span class="ruby-identifier">string</span>]
67:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002210" class="method-detail">
        <a name="M002210"></a>

        <div class="method-heading">
          <a href="#M002210" class="method-signature">
          <span class="method-name">lookup_by_extension</span><span class="method-args">(extension)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002210-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002210-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 69</span>
69:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup_by_extension</span>(<span class="ruby-identifier">extension</span>)
70:         <span class="ruby-constant">EXTENSION_LOOKUP</span>[<span class="ruby-identifier">extension</span>]
71:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002214" class="method-detail">
        <a name="M002214"></a>

        <div class="method-heading">
          <a href="#M002214" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(string, symbol = nil, synonyms = [])</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002214-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002214-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 147</span>
147:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">synonyms</span> = [])
148:       <span class="ruby-ivar">@symbol</span>, <span class="ruby-ivar">@synonyms</span> = <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">synonyms</span>
149:       <span class="ruby-ivar">@string</span> = <span class="ruby-identifier">string</span>
150:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002213" class="method-detail">
        <a name="M002213"></a>

        <div class="method-heading">
          <a href="#M002213" class="method-signature">
          <span class="method-name">parse</span><span class="method-args">(accept_header)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002213-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002213-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 88</span>
 88:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">accept_header</span>)
 89:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">accept_header</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/,/</span>
 90:           [<span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">accept_header</span>)]
 91:         <span class="ruby-keyword kw">else</span>
 92:           <span class="ruby-comment cmt"># keep track of creation order to keep the subsequent sort stable</span>
 93:           <span class="ruby-identifier">list</span> = []
 94:           <span class="ruby-identifier">accept_header</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>).<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header</span>, <span class="ruby-identifier">index</span><span class="ruby-operator">|</span> 
 95:             <span class="ruby-identifier">params</span>, <span class="ruby-identifier">q</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/;\s*q=/</span>)       
 96:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>
 97:               <span class="ruby-identifier">params</span>.<span class="ruby-identifier">strip!</span>          
 98:               <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">AcceptItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">index</span>, <span class="ruby-identifier">params</span>, <span class="ruby-identifier">q</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">empty?</span>
 99:             <span class="ruby-keyword kw">end</span>
100:           <span class="ruby-keyword kw">end</span>
101:           <span class="ruby-identifier">list</span>.<span class="ruby-identifier">sort!</span>
102: 
103:           <span class="ruby-comment cmt"># Take care of the broken text/xml entry by renaming or deleting it</span>
104:           <span class="ruby-identifier">text_xml</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;text/xml&quot;</span>)
105:           <span class="ruby-identifier">app_xml</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>.<span class="ruby-identifier">to_s</span>)
106: 
107:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text_xml</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">app_xml</span>
108:             <span class="ruby-comment cmt"># set the q value to the max of the two</span>
109:             <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>].<span class="ruby-identifier">q</span> = [<span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>].<span class="ruby-identifier">q</span>, <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>].<span class="ruby-identifier">q</span>].<span class="ruby-identifier">max</span>
110: 
111:             <span class="ruby-comment cmt"># make sure app_xml is ahead of text_xml in the list</span>
112:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_xml</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">text_xml</span>
113:               <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>] = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
114:               <span class="ruby-identifier">app_xml</span>, <span class="ruby-identifier">text_xml</span> = <span class="ruby-identifier">text_xml</span>, <span class="ruby-identifier">app_xml</span>
115:             <span class="ruby-keyword kw">end</span>
116: 
117:             <span class="ruby-comment cmt"># delete text_xml from the list</span>
118:             <span class="ruby-identifier">list</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">text_xml</span>)
119: 
120:           <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">text_xml</span>
121:             <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>].<span class="ruby-identifier">name</span> = <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>.<span class="ruby-identifier">to_s</span>
122:           <span class="ruby-keyword kw">end</span>
123: 
124:           <span class="ruby-comment cmt"># Look for more specific XML-based types and sort them ahead of app/xml</span>
125: 
126:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_xml</span>
127:             <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">app_xml</span>
128:             <span class="ruby-identifier">app_xml_type</span> = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
129: 
130:             <span class="ruby-keyword kw">while</span>(<span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
131:               <span class="ruby-identifier">type</span> = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>]
132:               <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">q</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">app_xml_type</span>.<span class="ruby-identifier">q</span>
133:               <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\+xml$/</span>
134:                 <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>] = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
135:                 <span class="ruby-identifier">app_xml</span> = <span class="ruby-identifier">idx</span>
136:               <span class="ruby-keyword kw">end</span>
137:               <span class="ruby-identifier">idx</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
138:             <span class="ruby-keyword kw">end</span>
139:           <span class="ruby-keyword kw">end</span>
140: 
141:           <span class="ruby-identifier">list</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">i</span>.<span class="ruby-identifier">name</span>) }.<span class="ruby-identifier">uniq!</span>
142:           <span class="ruby-identifier">list</span>
143:         <span class="ruby-keyword kw">end</span>
144:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002212" class="method-detail">
        <a name="M002212"></a>

        <div class="method-heading">
          <a href="#M002212" class="method-signature">
          <span class="method-name">register</span><span class="method-args">(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002212-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002212-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 79</span>
79:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">mime_type_synonyms</span> = [], <span class="ruby-identifier">extension_synonyms</span> = [], <span class="ruby-identifier">skip_lookup</span> = <span class="ruby-keyword kw">false</span>)
80:         <span class="ruby-constant">Mime</span>.<span class="ruby-identifier">instance_eval</span> { <span class="ruby-identifier">const_set</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">mime_type_synonyms</span>) }
81: 
82:         <span class="ruby-constant">SET</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Mime</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>)
83: 
84:         ([<span class="ruby-identifier">string</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">mime_type_synonyms</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">string</span><span class="ruby-operator">|</span> <span class="ruby-constant">LOOKUP</span>[<span class="ruby-identifier">string</span>] = <span class="ruby-constant">SET</span>.<span class="ruby-identifier">last</span> } <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">skip_lookup</span>
85:         ([<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">extension_synonyms</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ext</span><span class="ruby-operator">|</span> <span class="ruby-constant">EXTENSION_LOOKUP</span>[<span class="ruby-identifier">ext</span>] = <span class="ruby-constant">SET</span>.<span class="ruby-identifier">last</span> }
86:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002211" class="method-detail">
        <a name="M002211"></a>

        <div class="method-heading">
          <a href="#M002211" class="method-signature">
          <span class="method-name">register_alias</span><span class="method-args">(string, symbol, extension_synonyms = [])</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Registers an alias that&#8216;s not used on mime type <a
href="Type.html#M002209">lookup</a>, but can be referenced directly.
Especially useful for rendering different HTML versions depending on the
user agent, like an iPhone.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002211-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002211-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 75</span>
75:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_alias</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">extension_synonyms</span> = [])
76:         <span class="ruby-identifier">register</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, [], <span class="ruby-identifier">extension_synonyms</span>, <span class="ruby-keyword kw">true</span>)
77:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002208" class="method-detail">
        <a name="M002208"></a>

        <div class="method-heading">
          <a href="#M002208" class="method-signature">
          <span class="method-name">unverifiable_types</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002208-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002208-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 33</span>
33:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unverifiable_types</span>
34:       <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Deprecation</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-value str">&quot;unverifiable_types is deprecated and has no effect&quot;</span>, <span class="ruby-identifier">caller</span>)
35:       <span class="ruby-ivar">@@unverifiable_types</span>
36:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M002219" class="method-detail">
        <a name="M002219"></a>

        <div class="method-heading">
          <a href="#M002219" class="method-signature">
          <span class="method-name">==</span><span class="method-args">(mime_type)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002219-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002219-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 172</span>
172:     <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">mime_type</span>)
173:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mime_type</span>.<span class="ruby-identifier">blank?</span>
174:       (<span class="ruby-ivar">@synonyms</span> <span class="ruby-operator">+</span> [ <span class="ruby-keyword kw">self</span> ]).<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">synonym</span><span class="ruby-operator">|</span> 
175:         <span class="ruby-identifier">synonym</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mime_type</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">synonym</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mime_type</span>.<span class="ruby-identifier">to_sym</span> 
176:       <span class="ruby-keyword kw">end</span>
177:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002218" class="method-detail">
        <a name="M002218"></a>

        <div class="method-heading">
          <a href="#M002218" class="method-signature">
          <span class="method-name">===</span><span class="method-args">(list)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002218-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002218-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 164</span>
164:     <span class="ruby-keyword kw">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">list</span>)
165:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
166:         (<span class="ruby-ivar">@synonyms</span> <span class="ruby-operator">+</span> [ <span class="ruby-keyword kw">self</span> ]).<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">synonym</span><span class="ruby-operator">|</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">synonym</span>) }
167:       <span class="ruby-keyword kw">else</span>
168:         <span class="ruby-keyword kw">super</span>
169:       <span class="ruby-keyword kw">end</span>
170:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002222" class="method-detail">
        <a name="M002222"></a>

        <div class="method-heading">
          <a href="#M002222" class="method-signature">
          <span class="method-name">browser_generated?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002222-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002222-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 189</span>
189:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">browser_generated?</span>
190:       <span class="ruby-ivar">@@browser_generated_types</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">to_sym</span>)
191:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002221" class="method-detail">
        <a name="M002221"></a>

        <div class="method-heading">
          <a href="#M002221" class="method-signature">
          <span class="method-name">html?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002221-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002221-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 185</span>
185:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">html?</span>
186:       <span class="ruby-ivar">@@html_types</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">to_sym</span>) <span class="ruby-operator">||</span> <span class="ruby-ivar">@string</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/html/</span>
187:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002215" class="method-detail">
        <a name="M002215"></a>

        <div class="method-heading">
          <a href="#M002215" class="method-signature">
          <span class="method-name">to_s</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002215-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002215-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 152</span>
152:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
153:       <span class="ruby-ivar">@string</span>
154:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002216" class="method-detail">
        <a name="M002216"></a>

        <div class="method-heading">
          <a href="#M002216" class="method-signature">
          <span class="method-name">to_str</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002216-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002216-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 156</span>
156:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>
157:       <span class="ruby-identifier">to_s</span>
158:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002217" class="method-detail">
        <a name="M002217"></a>

        <div class="method-heading">
          <a href="#M002217" class="method-signature">
          <span class="method-name">to_sym</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002217-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002217-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 160</span>
160:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_sym</span>
161:       <span class="ruby-ivar">@symbol</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@string</span>.<span class="ruby-identifier">to_sym</span>
162:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M002220" class="method-detail">
        <a name="M002220"></a>

        <div class="method-heading">
          <a href="#M002220" class="method-signature">
          <span class="method-name">verify_request?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns true if Action Pack should check requests using this <a
href="../Mime.html">Mime</a> <a href="Type.html">Type</a> for possible
request forgery. See <a
href="../ActionController/RequestForgeryProtection.html">ActionController::RequestForgeryProtection</a>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M002220-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M002220-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 181</span>
181:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_request?</span>
182:       <span class="ruby-identifier">browser_generated?</span>
183:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>